﻿using System;
using System.Collections.Generic;
using DevExpress.Xpo;
using System.Text;

namespace BusinessObjects
{
    public class QuanHuyen : XPObject
    {
        public QuanHuyen()
            : base()
        {
            // This constructor is used when an object is loaded from a persistent storage.
            // Do not place any code here.
        }

        public QuanHuyen(Session session)
            : base(session)
        {
            // This constructor is used when an object is loaded from a persistent storage.
            // Do not place any code here.
        }

        public override void AfterConstruction()
        {
            base.AfterConstruction();
            // Place here your initialization code.
        }

        //Fields
        string fTenQuanHuyen;
        [Size(500)]
        public string TenQuanHuyen
        {
            get { return fTenQuanHuyen; }
            set { SetPropertyValue<string>("TenQuanHuyen", ref fTenQuanHuyen, value); }
        }
        TinhThanh fTinhThanh;
        [Association(@"QuanHuyenReferencesTinhThanh")]
        public TinhThanh TinhThanh
        {
            get { return fTinhThanh; }
            set { SetPropertyValue<TinhThanh>("TinhThanh", ref fTinhThanh, value); }
        }
        [Association(@"DiaChiReferencesQuanHuyen", typeof(DiaChi))]
        public XPCollection<DiaChi> DiaChis { get { return GetCollection<DiaChi>("DiaChis"); } }
    }
}
